             package com.java.diagnostics.visualizer.recommender;
             
             import com.java.diagnostics.visualizer.data.AggregateData;
             import com.java.diagnostics.visualizer.data.StructuredData;
             import com.java.diagnostics.visualizer.parser.javadump.InstanceJavaDumpParser;
             import com.java.diagnostics.visualizer.recommender.util.Messages;
             import java.text.MessageFormat;
             import java.util.Map;
             
             public class JavaDumpInfo
               extends RecommendationBase
               implements Recommendation
             {
               private static final String VERBOSE_GCLOG = "-Xverbosegclog:verbosegc.log";
               private static final String VERBOSE_GC = "-verbose:gc";
               private final String coreWarning = Messages.getString("JavaDumpInfo.javacore.verbose.gc.disabled");
               
               private final String coreWithVerboseGCWarning = Messages.getString("JavaDumpInfo.javacore.verbose.gc.to.stderr");
               
               private final String coreWithVerboseGCLogWarning = Messages.getString("JavaDumpInfo.javacore.verbose.gc.to.file");
               
               public void recommend(AggregateData data)
               {
                 StructuredData coreInfo = data
                   .getStructuredData(InstanceJavaDumpParser.class.getName());
                 if (coreInfo == null) {
                   return;
                 }
                 Map coreInfoData = coreInfo.getContents();
                 if ("javacore".equals(coreInfoData.get("FILETYPE"))) {
                   if ("enabled".equals(coreInfoData.get("VERBOSEGCENABLED")))
                   {
                     if (coreInfoData.containsKey("VERBOSEGCLOG")) {
                       addWarning(data, MessageFormat.format(
                         this.coreWithVerboseGCLogWarning, new Object[] {
                         coreInfoData.get("VERBOSEGCLOG") }));
                     } else {
                       addWarning(data, this.coreWithVerboseGCWarning);
                     }
                   } else {
                     addWarning(data, this.coreWarning);
                     addToCommandLine(data, "-verbose:gc", "-verbose:gc");
                     addToCommandLine(data, "-Xverbosegclog:verbosegc.log", "-Xverbosegclog:verbosegc.log");
                   }
                 }
               }
             }


